/*
	       File: ThreadPool.cs
	Create Date: 2007-08-12
	    Version:

	Description:
                Provides a custom threadpool for situations where the builtin threadpool isn't appropriate

	 Change log:


*/
using System;
using System.Collections;
using System.Diagnostics;
using System.Threading;

namespace GuerillaProgrammer.Components.GPThreadPool
{
	public class GPThreadPool
	{
		public GPThreadPool(int maxThreads)
		{
            ThreadPool.SetMaxThreads(maxThreads, maxThreads);
		}
		
		public void QueueItem(WaitCallback workItem)
		{
    		//If Count already equals the capacity of the Queue, the capacity is 
			//increased automatically.
            ThreadPool.QueueUserWorkItem(workItem);
		}
    }
}
